import 'virtual:uno.css'
import install from "vue-bag-admin"
import { createRouter, createWebHistory } from "vue-router"
import { setup as dataSetup } from '@/utils/dataPlus.js'

dataSetup()

const { app, framework, plugins } = install()

const routes = [
    {
        path: '/',
        name: 'layout',
        component: () => import('@/layouts/main.vue'),
        children: [
            {
                path: '/',
                name: 'home',
                component: () => import('@/components/HelloWorld.vue'),
            },
            {
                path: '/zhouyi/detail/:binary?',
                name: 'zhouyi-detail',
                component: () => import('@/views/zhouyi/detail.vue'),
            },
            {
                path: '/zhouyi/grid/:binary?',
                name: 'zhouyi-grid',
                component: () => import('@/views/zhouyi/grid.vue'),
            },
            {
                path: '/zhouyi/gridByGong/:binary?',
                name: 'grid-by-gong',
                component: () => import('@/views/zhouyi/gridByGong.vue'),
            },
            {
                path: '/zhouyi/gridByXianTian/:binary?',
                name: 'grid-by-xian-tian',
                component: () => import('@/views/zhouyi/gridByXianTian.vue'),
            }
        ]

    },
]

const router = createRouter({
    history: createWebHistory(),
    routes,
})

framework.use(plugins.useLayoutPlugin)



framework.use(plugins.useRouterPlugin, {
    router,
})

// $global.helpers.cutColorTheme($global, '#0094FF')

$globalStore.configs.isDarkMode = false

app.mount('#app')